<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-用户列表">
</@frame.head>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>


	</head>
	<body style="background:none">
					<div class="sell_add">
							<div>
								<form action="/productQuestionsAnswersSetting/add_sensitiveWords" 
									method="post" id="productformlist" 
									name="productformlist">
									
									<table>
										<tr style="height: 40px;">
											<td>
											<strong>&nbsp;敏感词汇库：</strong>
											<input  class="input-text radius size-M" type="text" name="words" style="width: 130px;"/>
												&nbsp;
											<input  type="button" class="btn btn-primary size-M radius" value="新增" onclick="buSubmit()"/>
												&nbsp;&nbsp;
											<input  type="button" class="btn btn-primary size-M radius" value="搜索" onclick="seach()"/>
												
											</td>
										</tr>
								
										<tr>
										<td>
										<div style="border:1px solid #A9A9A9 ;width:480px;height:240px;margin: 0 auto;" >
										<#list wordsList as list> 
										<a href="javascript:void(0)" onclick="deleteWords('${list}')">${list}
										</a> 
										</#list>
										</div>
										</td>
										</tr>
									</table>
								</form>
							</div>
						</div>
<script type="text/javascript" src="${contextPath}/resources/js/jquery-1.3.2.min.js"></script>
		<script type="text/javascript">

			
			//新增
			function buSubmit(){
				
				$('#productformlist').attr("action", "${contextPath}/productQuestionsAnswersSetting/add_sensitiveWords").submit()
				
			}
			//搜索
			function seach(){
				
				$('#productformlist').attr("action", "${contextPath}/productQuestionsAnswersSetting/seach_sensitiveWords").submit()
				
			}
			//新增
			function deleteWords(words){
				if(confirm("确定删除该词？")){
					$.ajax({
						url:"${contextPath}/productQuestionsAnswersSetting/del_sensitiveWords",
						type:"post",
						dataType:"text",
						data:{"words":words},
						error:function(XMLHttpRequest, textStatus, errorThrown){
				       		
						},
						success:function(msg) 
						{
							   window.open("${contextPath}/productQuestionsAnswersSetting/to_add_sensitiveWords",'_self') 
							     {
							     
							opener.location.href("${contextPath}/productQuestionsAnswersSetting/to_add_sensitiveWords");
							     }
						
			            }
					});
					
				}
				
			}
			
		</script>

	</body>
</html>

